package com.example.cloud.web.controller;

import javax.annotation.Resource;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.cloud.web.service.NameService;

/**
 * @author wjwjtftf Created on 2017/9/26.
 */
@RestController
public class NameController {

	@Resource
	private NameService nameService;

	@RequestMapping(value = "/name")
	public ResponseEntity<String> readAppName() {

		String serviceName = nameService.getServiceName();

		return new ResponseEntity<>(serviceName, HttpStatus.OK);
	}
}
